package com.best.service;

import com.best.dto.LabelSelect;
import com.best.enums.EffectType;
import com.best.enums.SeriesType;
import com.best.enums.TasteType;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

/**
 * @author yangruyi
 * @date 2021/3/11
 */
@Service
public class LabelService {
    public List<LabelSelect> tasteLabel(){
        List<LabelSelect> list = new ArrayList<>();
        for (TasteType value : TasteType.values()) {
            LabelSelect select = new LabelSelect(value.getCode()+"", value.name());
            list.add(select);
        }
        return list;
    }

    public List<LabelSelect> seriesLabel(){
        List<LabelSelect> list = new ArrayList<>();
        for (SeriesType value : SeriesType.values()) {
            LabelSelect select = new LabelSelect(value.getCode()+"", value.name());
            list.add(select);
        }
        return list;
    }
    public List<LabelSelect> effectLabel(){
        List<LabelSelect> list = new ArrayList<>();
        for (EffectType value : EffectType.values()) {
            LabelSelect select = new LabelSelect(value.getCode()+"", value.name());
            list.add(select);
        }
        return list;
    }
    public List<LabelSelect> stateLabel(){
        List<LabelSelect> list = new ArrayList<>();
        LabelSelect label1 = new LabelSelect("0", "未审核");
        LabelSelect label2 = new LabelSelect("1", "审核通过");
        LabelSelect label3 = new LabelSelect("2", "审核不通过");
        list.add(label1);
        list.add(label2);
        list.add(label3);
        return list;
    }
}
